package com.example.demo.common.mapper;

import java.util.Set;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.example.demo.common.entity.Role;

@Mapper
public interface RoleMapper  extends BaseMapper<Role> {
	
	@Select(" select r.role_name from user_role ur join role r on r.id=ur.role_id"
			+ " where ur.username=#{username}" )
	public Set<String> getRole(@Param("username") String username);
}